home *** CD-ROM | disk | FTP | other *** search
- Path: news.ov.com!news
- From: glenn@ov.com (Fletcher.Glenn@ov.com)
- Newsgroups: comp.lang.c
- Subject: Re: a question on "return"
- Date: 6 Feb 1996 01:08:27 GMT
- Organization: OpenVision
- Message-ID: <4f69mb$5s0@spanky.pls.ov.com>
- References: <4f2ipq$kaf@srvr1.engin.umich.edu>
- Reply-To: glenn@ov.com
- NNTP-Posting-Host: foghorn.pls.ov.com
-
- In article kaf@srvr1.engin.umich.edu, cjlin@news-server.engin.umich.edu (Chih-Jen Lin) writes:
- >In C, usually we treat 1 as true and 0 as false.
- >However, we usually use return(0) after normal end of an int
- >function and return(1) when some errors happen.
- >Can some one tell me why we return a false value after normal
- >end of a function ?
- >
- >Thanks in advance.
- >
- >Chih-Jen Lin
-
-
- Because the return convention is True = Error. This is not a C convention,
- but a system convention.
-
- Fletcher.Glenn@ov.com
-
-
-